@import '../config/config.less';

.motion-common() {
    animation-duration: @animation-time;
    animation-fill-mode: both;
}

.make-motion(@className, @keyframeName) {

    .@{className}-enter-active,
    .@{className}-appear {
        .motion-common();
         animation-play-state: paused;
    }
    .@{className}-leave-active {
        .motion-common();
        animation-play-state: paused;
    }
    .@{className}-enter-active, .@{className}-appear {
        animation-name: ~"@{keyframeName}In";
        animation-play-state: running;
    }
    .@{className}-leave-active {
        animation-name: ~"@{keyframeName}Out";
        animation-play-state: running;
    }
}

@import "fade";
@import "move";
@import "ease";
@import "slide";
@import "popup";


.collapse-transition {
    transition:
        @transition-time height ease-in-out,
        @transition-time padding-top ease-in-out,
        @transition-time padding-bottom ease-in-out;
}

.@{css-prefix}load-loop {
    animation: loopRotate 1s 0s linear infinite;
}


@keyframes loopRotate {
    0% {
       transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0px);
    }
    20% {
        transform: translateX(-5px);
    }
    40% {
        transform: translateX(5px);
    }
    60% {
        transform: translateX(-5px);
    }
    80% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(-5px);
    }
}
